package org.example.enums;

public enum JobPostStatus {
    DRAFT,
    PUBLISHED,
    CLOSED,
    EXPIRED;

    public static JobPostStatus fromString(String status) {
        switch (status.toLowerCase()) {
            case "draft":
                return DRAFT;
            case "published":
                return PUBLISHED;
            case "closed":
                return CLOSED;
            case "expired":
                return EXPIRED;
            default:
                throw new IllegalArgumentException("Invalid job post status: " + status);
        }
    }
}
